// comnRes.cpp : Defines the initialization routines for the DLL.
//

#include "stdafx.h"
#include "comnRes.h"    


//
//	Note!
//
//		If this DLL is dynamically linked against the MFC
//		DLLs, any functions exported from this DLL which
//		call into MFC must have the AFX_MANAGE_STATE macro
//		added at the very beginning of the function.
//
//		For example:
//
//		extern "C" BOOL PASCAL EXPORT ExportedFunction()
//		{
//			AFX_MANAGE_STATE(AfxGetStaticModuleState());
//			// normal function body here
//		}
//
//		It is very important that this macro appear in each
//		function, prior to any calls into MFC.  This means that
//		it must appear as the first statement within the 
//		function, even before any object variable declarations
//		as their constructors may generate calls into the MFC
//		DLL.
//
//		Please see MFC Technical Notes 33 and 58 for additional
//		details.
//

/////////////////////////////////////////////////////////////////////////////
// CComnResApp

BEGIN_MESSAGE_MAP(CComnResApp, CWinApp)
	//{{AFX_MSG_MAP(CComnResApp)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CComnResApp construction

CComnResApp::CComnResApp() 
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CComnResApp object
CComnResApp theApp;
static	const char *ssBmp[]=
{
//	//file
//	"bmp_saveas","bmp_plot","bmp_save","bmp_new","bmp_open","file_render",
//	//
//	"bmp_select_1","bmp_select_multi","bmp_select_filter","bmp_select_pick",
//	//
//	"bmp_page_last","bmp_page_next",
//	"bmp_last_page","bmp_next_page",
//	//snap
//	"snap_app_int","snap_center","snap_ext","snap_from","snap_ins","snap_int",
//	"snap_mid","snap_near","snap_node","snap_none","snap_para","snap_perp",
//	"snap_quad","snap_setting","snap_tan","snap_temp","snap_end",
////view
//	"bmp_view_top","bmp_view_bottom","view_swgl",
//	"bmp_view_front","bmp_view_back",
//	"bmp_view_left","bmp_view_right",
//	"bmp_view_sw","bmp_view_se","bmp_view_nw","bmp_view_ne","bmp_view_user",
//	"bmp_view_pers","bmp_zoome_sel",
//	"bmp_zoome","bmp_zoompan","bmp_zoomall","bmp_zoomwin",
//	"bmp_zoom2x","bmp_zoomx2","bmp_view_orbit","bmp_zoome_all",
//	"bmp_redraw","bmp_zoomx","bmp_zoompip","bmp_zoomprv","bmp_zoomsx",
//	"bmp_zoomrealtime",
//	//draw 2d
//	"bmp_line","bmp_arc","bmp_circle","bmp_ellipse","bmp_polygon",
//	"bmp_elpolygon","bmp_polyline","bmp_rect","bmp_spline","bmp_text",
//	"bmp_ellipse_arc","bmp_ray",
//	//modify
//	"bmp_erase","bmp_copy","bmp_undo","bmp_redo","bmp_mirror","bmp_array",
//	"bmp_move","bmp_rotate","bmp_break",
//	"bmp_chamfer","bmp_explode","bmp_offset",
//	"bmp_scale","bmp_stretch","bmp_hatch",
//	"bmp_trim","bmp_lengthen","bmp_extend",
//	"bmp_character","bmp_help",
//	"bmp_backcolor","bmp_selectucs","bmp_command","bmp_calculator",
//	"bmp_snaparea","bmp_insertfile","bmp_saveelement","bmp_dimround",
//	"bmp_savewmf","bmp_textalign","bmp_textavoid","bmp_textdownspace",
//	"bmp_textmerge","bmp_snapedittext","bmp_replacetext","bmp_editfont",
//	"bmp_paraline","bmp_mousekeyboard","bmp_dorut",
//	"bmp_multiline","bmp_arcset","bmp_confirm","bmp_select","bmp_scrollbar",
//	"bmp_prompt","bmp_toolbar","bmp_offsetelement","bmp_dragcopy","bmp_rotatecopy",
//	"bmp_transform","bmp_insertpoint","bmp_dragendcopy","bmp_onofflayer","bmp_delnowlayer",
//	"bmp_snapnowlayer","bmp_setcolor","bmp_setlinetype","bmp_setlinewidth",
//	"bmp_checktextsize","bmp_editentext","bmp_changeenangle","bmp_changeensize",
//	"bmp_dragentext","bmp_changechsize","bmp_changechangle","bmp_dragchtext",
//	"bmp_editchtext","bmp_change","bmp_areatrim","bmp_layer","bmp_inquirepp",
//	"bmp_inquirepl","bmp_inquirell","bmp_inquirecc","bmp_inquireradius",
//	"bmp_inquirediameter","bmp_inquireangle","bmp_dimangle",
//    "bmp_dimcc","bmp_dimdiameter","bmp_dimline","bmp_dimll","bmp_dimpl","bmp_dimpp",
//	"bmp_dimradius","bmp_changetopkpm","bmp_dragucs","bmp_tonowlayer","bmp_orginucs",
//	"bmp_parameter","bmp_matchlayer","bmp_snapinquire","bmp_snpmodify",
//	"bmp_modifylayer","bmp_inquirelntype","bmp_editlntype","bmp_chinese",
//	"bmp_number","bmp_formarea","bmp_indexnote","bmp_setfont","bmp_inquirefont",
//	"bmp_onofffill","bmp_viewpoint","bmp_saveexit","bmp_savepreview",
//	"bmp_displaypreview","bmp_continueline","bmp_3parc","bmp_evencopy","bmp_clearundo",
//	"bmp_setundo","bmp_singleundo","bmp_renewdrawing","bmp_insertblock",
//	"bmp_elementproperty","bmp_settoolbar","bmp_options","bmp_insertframe",
//	"bmp_editscale","bmp_autosavetime","bmp_setucs","bmp_unifyucs","bmp_exit",
//	"bmp_defpattern","bmp_ttodwg","bmp_dxftot","bmp_unitedrawing","bmp_insertwmf",
//	"bmp_insertole","bmp_pasteole","bmp_selpasteole","bmp_linepattern","bmp_update",
//	"bmp_editcut","bmp_editcopy","bmp_editpaste","bmp_elementoffset","bmp_pkpmline",
//	"bmp_pkpmpolyline","bmp_pkpmrect","bmp_pkpm3parc","bmp_pkpmarc","bmp_pkpmcircle",
//	"bmp_arrow","bmp_compass","bmp_section","bmp_detailmark","bmp_detailindex",
//	"bmp_cutindex","bmp_defblock","bmp_apmlib","bmp_filetolib","bmp_userlib",
//	"bmp_cut","bmp_edit_paste","bmp_edit_copy","bmp_cleanlinetype","bmp_undotmark",
//	"bmp_2drender","bmp_floorlevel","bmp_drawaxis","bmp_drawingname","bmp_symmetry",
//	"bmp_cutoffline","bmp_cutaway","bmp_deftextsize","bmp_inputtext","bmp_fileline",
//	"bmp_fileblock","bmp_libway","bmp_insertlib","bmp_copylib","bmp_deletelib","bmp_moveblock",
//    "bmp_copyblock","bmp_deleteblock","bmp_blocksize","bmp_blockangle",	"bmp_lefttoright",
//	"bmp_uptodown","bmp_graphlib",
//   "tab_create","tab_display","tab_utility",
//   "win_single","win_four","bmp_matedit","bmp_sel_lock",
//   "bmp_folder_open","bmp_folder_close","view_switch",
//   "op_select","op_move","op_rotate","op_scale","mdf_erase","mdf_pin1","mdf_pin2",
//   "mdf_show_result","mdf_config","mdf_unique",
//   //layer
//   "ly_freeze","ly_unfreeze","ly_on","ly_off","ly_lock","ly_unlock","ly_assign",
//   //draw 2d
//   "2d_faceOutline","2d_divRegion","2d_eWideBand",
//   //draw 3d
//   "3d_bevel","3d_box","3d_cylinder","3d_extrude","3d_loft","3d_region","3d_roundEdge",
//   "3d_sphere","3d_surface","3d_helix","3d_lathe","3d_lineToPole","3d_orthoToLine",
//   "3d_point","3d_bend","3d_cut","3d_cutin","3d_cutout","3d_slice","3d_subtract",
//   "3d_union","3d_cone",
//// Garden icons added by why 2004-6-25
//	"bmp_addgrasspt","bmp_analysisht","bmp_assignpt","bmp_changeplantway","bmp_changetocontour",
//	"bmp_chgterrian","bmp_chgwithterrian","bmp_childtable","bmp_contour",
//	"bmp_cutseeding","bmp_designground","bmp_dispterrian","bmp_drawlacing",
//	"bmp_earthwork","bmp_editmethod","bmp_flowanalysis","bmp_gradeanalysis",
//	"bmp_gradedist","bmp_groupplant","bmp_imptterrian","bmp_lawn","bmp_linkcontour",
//	"bmp_orientation","bmp_plancontour","bmp_planproperty","bmp_planttable","bmp_pool",
//	"bmp_topography","bmp_plant","bmp_updateroad","bmp_stairs","bmp_setlight",
	"op_select","bmp_select_pick","bmp_select_multi","bmp_view_pers","bmp_character","bmp_erase",
	"view_swgl","bmp_zoome_all","bmp_zoompan","bmp_zoomsx","bmp_plot","bmp_saveas","bmp_save","bmp_open","bmp_new",
	"bmp_exit","mdf_pin1","mdf_config","mdf_pin2","mdf_show_result","mdf_unique",
    "bmp_3parc","bmp_POLYLINE","3d_point","bmp_text",
    "bmp_layer","bmp_SPLINE","bmp_RECT","bmp_circle","bmp2d_donut",
    "3d_extrude","3d_sphere","3d_cone","3d_cylinder","3d_box",
    "bmp_select_filter","bmp_redo","bmp_undo","3d_loft",
    "bmp_rotate","bmp_move","bmp_mirror","bmp_array","bmp_copy",
    "2d_faceoutline","bmp_scale",
    "snap_int","snap_mid","snap_end","snap_from","snap_temp",
    "snap_tan","snap_quad","snap_center","snap_ext","snap_app_int",
    "snap_near","snap_node","snap_ins","snap_para","snap_perp",
    "bmp_view_left","bmp_view_bottom","bmp_view_top","snap_setting","snap_none",
    "bmp_view_se","bmp_view_sw","bmp_view_back","bmp_view_front","bmp_view_right",
    "bmp_zoom2x","bmp_view_orbit","view_switch","bmp_view_ne","bmp_view_nw",
    "bmp_backcolor","bmp_zoome","bmp_zoomwin","bmp_zoomrealtime","bmp_zoomx2",
    "bmp_linkcontour","bmp_contour","bmp_topography","bmp_assignpt","bmp_imptterrian",
    "bmp_analysisht","bmp_orientation","bmp_flowanalysis","bmp_gradeanalysis","bmp_gradedist",
    "bmp_dispterrian","bmp_earthwork","bmp_chgterrian","bmp_plancontour","bmp_changetocontour",
    "bmp_stairs","bmp_pool","bmp_designground","bmp_updateroad","mdf_erase",
    "bmp_changeplantway","bmp_editmethod","bmp_addgrasspt","bmp_lawn","bmp_plant",
    "bmp_groupplant","bmp_chgwithterrian","bmp_planproperty","bmp_cutseeding","bmp_drawlacing",
    "bmp_help","file_render","bmp_matedit","bmp_planttable","bmp_childtable","bmp_select_1",
	"bmp_page_last","bmp_page_next","bmp_sel_lock","bmp_folder_close","bmp_folder_open","bmp_inquire",
	"bmp_offset","bmp_deletegrid","bmp_movenode","bmp_deletesurface","bmp_about",
	"bmp_whatsnew","bmp_drawplan","bmp_light","bmp_camera","bmp_circlearray",
	"bmp_scatgroup","bmp_specificshape","bmp_definegroup","bmp_breakgroup","bmp_contourheight",
	"bmp_exploretoface","bmp_dwgin","bmp_tin","bmp_imp3ds","bmp_dddin","bmp_dxxin","bmp_dxxout",
	"bmp_regen","bmp_road","bmp_fence","bmp_lib","bmp_creatregion","bmp_flowerbed","bmp_line",
	"bmp_purge","bmp_slice","bmp_fillet","bmp_chamfer","bmp_trim","bmp_extend","bmp_properties",
	"bmp_cmdhistroy","bmp_quick_show","bmp_viewport","bmp_y1","bmp_y2","bmp_y3","bmp_y4",
	"bmp_area","bmp_defngrs","bmp_join","bmp_matchprop","bmp_mdf_config","bmp_resurf",
	"bmp_uniarray","bmp_vscale","bmp_apmbuild","bmp_break","bmp_roof","bmp_section",
	"bmp_animationway","3d_subtract","3d_union","bmp_extrude1","bmp_view_list",
	"ly_cur","ly_brush","ly_iso","ly_off1","ly_lock1","ly_merge","bmp_go_last","bmp_go_next","bmp_last_level",
	"bmp_inherit","bmp_check_ss","bmp_pgn","em_move","em_push","em_alongpath","em_offset","em_rotation",
	"em_scale","bmp_go_left","bmp_go_right","bmp_libin","bmp_array3d","bmp_union","bmp_subtract","bmp_intersect",
	"vs_hidden","vs_wireframe","vs_texture","vs_shaded","vs_monochrome",
	//////////////////////////////////////////////////////////////////////////
	"m3d_select","m3d_material","m3d_line","m3d_arc","m3d_circle","m3d_byhand","m3d_polygon","m3d_rectangle",
	"m3d_move","m3d_loft","m3d_rotation","m3d_stretch","m3d_scale","m3d_offset",
	"m3d_zm_extend","m3d_zm_undo","m3d_zm_window","m3d_zm_scale","m3d_zm_pan","m3d_zm_rotation",
	"m3d_component","m3d_eraser","m3d_file_new","m3d_file_open","m3d_file_save",
	"m3d_undo","m3d_redo","m3d_vp_iso","m3d_vp_top","m3d_vp_left","m3d_vp_right","m3d_vp_front","m3d_vp_back",
	"m3d_vm_xray","m3d_vm_hidelines","m3d_vm_shaded","m3d_vm_shaded_tex","m3d_vm_monochrome","m3d_vm_wireframe",
	"m3d_tape","m3d_axes","m3d_protractor","m3d_text3d","m3d_layer","m3d_mat_prev","m3d_mat_default","m3d_mat_inmodel",
	"m3d_mat_menu","m3d_mat_new","m3d_mat_next","m3d_mat_pick","m3d_pick_color","m3d_pick_screen","m3d_file_open2",
	"filter_none","filter_vertex","filter_edge","filter_face","bmp_stretch",
};
/*extern "C" __declspec( dllexport)*/ int   GetResBitmapCount()
{
	return _countof(ssBmp);
}
/*extern "C"  __declspec( dllexport )*/ void  GetResBitmapAt(int i,const char**name,HBITMAP*bmp,COLORREF*mkColor)
{
 	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	*bmp=::LoadBitmap(AfxGetInstanceHandle(),ssBmp[i]);
// 	int nErr=GetLastError();
	ASSERT(*bmp);
	*name=ssBmp[i];
	*mkColor=RGB(0,255,0);
}
